% here positives = zeros, negatives = nonzeros
function s = sensitivity(A, A_est, tol)
	tp = sum(sum((abs(A) <  tol) & (abs(A_est) <  tol)));
	fp = sum(sum((abs(A) >= tol) & (abs(A_est) <  tol)));
	tn = sum(sum((abs(A) >= tol) & (abs(A_est) >= tol)));
	fn = sum(sum((abs(A) <  tol) & (abs(A_est) >= tol)));
	s = tp/(tp+fn);
end
